﻿using System;
using System.Xml.Serialization;
using PrearrangedChaos.AgileZen.Service.Rest;

namespace PrearrangedChaos.AgileZen.Service.Model
{
    /// <remarks/>
    [XmlTypeAttribute(AnonymousType = true)]
    [XmlRootAttribute(ElementName = "comment", Namespace = "", IsNullable = false)]
    [ZenRestRequest("projects/{ProjectId}/stories/{StoryId}/comments/{CommentId}", "projects/{ProjectId}/stories/{StoryId}/comments")]
    public partial class Comment : CommentUpdater, IComment
    {
        private IUser _author;

        /// <remarks/>
        [XmlElement(ElementName = "author")]
        public User AuthorXmlElement
        {
            get { return this._author as User; }
            set { this._author = value; }
        }

        [XmlIgnore]
        public IUser Author
        {
            get { return _author; }
            set { _author = value; }
        }

        public bool AuthorXmlElementSpecified { get { return false; } }

        /// <remarks/>
        [XmlElement(ElementName = "createTime")]
        public DateTime CreateTime { get; set; }

        public bool CreateTimeSpecified { get { return false; } }
    }
}